<?php

namespace Keio\StudyBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class CauhoiType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('tieude')
            ->add('noidung', 'textarea')
            ->add('goiy', 'textarea')
            ->add('diem', 'text')
            ->add('monhoc')
/*            ->add('loai', 'choice', array(
    			'choices'   => array(
        			'0'   => 'Trắc nghiệm',
        			'1'   => 'Tự trả lời',
    				),
    			'multiple'  => false,
    			'expanded'    => true,
				))*/
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Keio\StudyBundle\Entity\Cauhoi'
        ));
    }

    public function getName()
    {
        return 'keio_studybundle_cauhoitype';
    }
}
